<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/common/meta.jsp"%>
<title>汪星客 - 个人中心 - 我的宠物</title>
</head>
<body>
	<div class="wrap">
		<div class="header_bg">
			<%@ include file="/common/header.jsp"%>
	    </div>
	    <div class="w">
	    	<div class="path box">
	    		<jsp:include page="/common/frame/frame_path.jsp">
            		<jsp:param name="current" value="我的狗狗"/>
            	</jsp:include>
	        </div>
	    </div>
	    <div class="main">
		    <div class="list box">
	        	<div class="pc_left">
	            	<jsp:include page="/common/frame/frame_left.jsp">
	            		<jsp:param name="checked" value="pet"/>
	            	</jsp:include>
	            </div>
	            <div class="pc_right">
	    			 <div class="pc_m fl">
	    			 	<c:forEach items="${petList}" var="pet">
	                	<div class="mydog fl">
	                    	<div class="mgdog_img fl">
	                    		<img width="120" height="120" src="${ctx}/tools/download.do?dir=PET&fileName=${pet.petPhotoPath}" onerror="this.src='${ctx}/images/pet_no_head.jpg'" />
	                    	</div>
	                        <p class="fl">
	                        	<span class="colr">${pet.petName}</span><br />
	                        	${pet.petAge}岁 / <c:if test="${pet.petSex==1}">男</c:if><c:if test="${pet.petSex==2}">女</c:if>孩<br />
	                        	${pet.petSomatotype} ${pet.petType}<br />
	                        	<a href="${ctx}/pet/edit.do?id=${pet.id}">修改信息</a>
	                        </p>
	                    </div>
	                    </c:forEach>
	                    <div class="mydog fl">
	                    	<div class="mgdog_img fl" onclick="tools.href('${ctx}/pet/edit.do')"><img src="${ctx}/images/pet_img2.png" /></div>
	                    </div>
	                </div>
				</div>
	    		<div class="clear"></div>
			</div>
		</div>
		<div class="footer_bg">
	    	<%@ include file="/common/footer.jsp"%>
	    </div>
	</div>
</body>
<script type="text/javascript">
// $.getJSON("${ctx}/pet/list.do", function(petList) {
// 	var $listUl = $("#frame_pet_main_list");
// 	$.each(petList, function(i, pet){
// 		var $li = $("<li></li>");
// 		$li.append("<input type='checkbox' name='petids' value='" + pet.id + "' />");
// 		var $img = $("<img src='${ctx}/images/pet_no_head.gif'/>").error(function(){
// 			$(this).attr("src", "${ctx}/images/pet_no_head.gif");
// 		}).attr({width:'50px',height:'50px',});
// 		if(pet.petPhotoPath) {
// 			$img.attr("src", "${ctx}/tools/download.do?dir=PET&fileName=" + pet.petPhotoPath);
// 		}
// 		$li.append($img);
// 		$li.append("<a href='javascript:openEditPanel(" + pet.id + ")' class='easyui-linkbutton'>" + pet.petName + "</a>");
// 		$listUl.append($li);
// 	});
// });
</script>
</body>
</html>